package com.example.android.commitcontent.ime.beans;

/**
 * 汉字javabean
 */
public class HanZiCharacter {
    public String hanzi;
    public String shengmu;
    public String yunmu;
    public String pinyin;
    public int bihua;
    public String bishun;
    public int repeatCount;

    public HanZiCharacter() {
    }

    public HanZiCharacter(String hanzi, String pinyin) {
        this.hanzi = hanzi;
        this.pinyin = pinyin;
    }

    public HanZiCharacter(String hanzi, String pinyin, int repeatCount) {
        this.hanzi = hanzi;
        this.pinyin = pinyin;
        this.repeatCount = repeatCount;
    }

    public HanZiCharacter(String hanzi, String shengmu, String yunmu, String pinyin, int bihua, String bishun) {
        this.hanzi = hanzi;
        this.shengmu = shengmu;
        this.yunmu = yunmu;
        this.pinyin = pinyin;
        this.bihua = bihua;
        this.bishun = bishun;
    }

    public HanZiCharacter(String hanzi, String shengmu, String yunmu, String pinyin, int bihua, String bishun, int repeatCount) {
        this.hanzi = hanzi;
        this.shengmu = shengmu;
        this.yunmu = yunmu;
        this.pinyin = pinyin;
        this.bihua = bihua;
        this.bishun = bishun;
        this.repeatCount = repeatCount;
    }

    /**
     * 是否为词组
     *
     * @return true为词组
     */
    public boolean isWord() {
        return pinyin.contains(",");
    }
}
